package com.flnet.foxwash.service.impl;

import java.util.List;

import com.flnet.foxwash.domain.WVendor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.flnet.foxwash.mapper.WMemberMapper;
import com.flnet.foxwash.domain.WMember;
import com.flnet.foxwash.service.IWMemberService;
import com.flnet.common.support.Convert;

/**
 * 会员 服务层实现
 * 
 * @author flnet
 * @date 2019-03-20
 */
@Service
public class WMemberServiceImpl implements IWMemberService 
{
	@Autowired
	private WMemberMapper wMemberMapper;

	/**
     * 查询会员信息
     * 
     * @param memberId 会员ID
     * @return 会员信息
     */
    @Override
	public WMember selectWMemberById(Long memberId)
	{
	    return wMemberMapper.selectWMemberById(memberId);
	}
	
	/**
     * 查询会员列表
     * 
     * @param wMember 会员信息
     * @return 会员集合
     */
	@Override
	public List<WMember> selectWMemberList(WMember wMember)
	{
	    return wMemberMapper.selectWMemberList(wMember);
	}
	
    /**
     * 新增会员
     * 
     * @param wMember 会员信息
     * @return 结果
     */
	@Override
	public int insertWMember(WMember wMember)
	{
	    return wMemberMapper.insertWMember(wMember);
	}
	
	/**
     * 修改会员
     * 
     * @param wMember 会员信息
     * @return 结果
     */
	@Override
	public int updateWMember(WMember wMember)
	{
	    return wMemberMapper.updateWMember(wMember);
	}

	/**
     * 删除会员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteWMemberByIds(String ids)
	{
		return wMemberMapper.deleteWMemberByIds(Convert.toStrArray(ids));
	}

	/**
	 * 更新会员对象状态
	 *
	 * @param wMember 需要更新状态的会员
	 * @return 结果
	 */
	@Override
	public int changeStatus(WMember wMember) {
		return wMemberMapper.updateWMember(wMember);
	}
}
